09. AIND Conda Environment
AI Nanodegree Conda Environment
Follow these instructions to create and configure your environment for the AI Nanodegree program. An environment file for supported OSes, which will install Python 3 and all the necessary packages used in the AI Nanodegree program is included in the supporting materials below. (The same file should support Windows, Linux, and OSX.)
Create the Environment
- Download the
aind-universal.yml
file at the bottom of this page (right click, save file). NOTE: Some browsers will automatically append a ".txt" extension to the yml file; if your browser does this, then you will need to remove the extension or alter the creation command to correct it. - Open a terminal and run
conda env create -f aind-universal.yml
to create the environment. - Activate the environment
- run
source activate aind
(OSX & Linux) - run
activate aind
(Windows)
- run
WARNING: YOU MAY GET ERRORS INSTALLING Z3 AND HMMLEARN -- DO NOT PANIC. Z3 is optional, and HMMLearn is only required for the final project.
Resolving Installation Errors
NOTE: You may need a C/C++ compiler to build some of the required packages if your system cannot find an installable binary. OSX & Linux users can use gcc & g++/clang (OSX users will need the XCode Command Line Tools available by running xcode-select --install
from a Terminal.) Windows users can download & install Visual C++ Build Tools here.
Activate the conda environment (source activate aind
or activate aind
, depending on your OS), then try installing with pip
:
(aind) ~$ pip install git+https://github.com/hmmlearn/hmmlearn.git
(aind) ~$ pip install z3-solver
Windows users can alternatively try installing a precompiled binary wheel:
Download the appropriate
hmmlearn-0.2.1-yourpythonwindows.whl
file from hereInstall the wheel:
(aind) :> pip install hmmlearn-0.2.1-yourpythonwindows.whl
A Word on Python Versions
The AIND program is using Python 3.5 for cross-platform compatibility of support libraries. The conda environment will install the correct version, but you should still remain mindful, as the base anaconda python installation is python 3.6. The Project Assistant will run all test cases in Python 3.5, which means that new features from python 3.6 (format strings, etc.) will raise SyntaxErrors or create other runtime issues (you cannot depend on the order of dictionary keys, for example).